﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xrm.Sdk;

namespace Crm.Utilities.SolutionsDeploymentTool.UI.Helpers
{
    public class ImportSettings
    {
        public List<Entity> SolutionsEntities;
        public List<String> SolutionFiles;
        public String ExportLocation;
        public ImportType ImportTypeSetting;
        public bool ConvertToManaged;
        public bool PublishWorkflows;
        public bool OverwriteUnmanagedCustomizations;
        public bool PublishAfterImport;

        public ImportSettings() { }

        public ImportSettings(List<Entity> solutionsEntities,
                              List<String> solutionsFiles,
                              string fileLocation,
                              ImportType importType,
                              bool convertToManaged,
                              bool publishWorkflows,
                              bool overwriteUnmanagedCustomizations)
        {
            SolutionsEntities = solutionsEntities;
            SolutionFiles = solutionsFiles;
            ExportLocation = fileLocation;
            ConvertToManaged = convertToManaged;
            PublishWorkflows = publishWorkflows;
            ImportTypeSetting = importType;
            OverwriteUnmanagedCustomizations = overwriteUnmanagedCustomizations;
        }
    }

    public class ExportSettings
    {
        public List<Entity> Solutions;
        public String ExportLocation;
        public ExportType ExportTypeSetting;
        public bool ExportAutoNumberingSettings;
        public bool ExportCalendarSettings;
        public bool ExportCustomizationSettings; 
        public bool ExportEmailTrackingSettings;
        public bool ExportGeneralSettings;
        public bool ExportIsvConfig;
        public bool ExportMarketingSettings;
        public bool ExportOutlookSynchronizationSettings;
        public bool ExportRelationshipRoles;

        public ExportSettings()
        { }

        public ExportSettings(List<Entity> solutions,
                                string exportLocation,
                                ExportType exportType,
                                bool exportAutoNumberingSettings,
                                bool exportCalendarSettings,
                                bool exportCustomizationSettings,
                                bool exportEmailTrackingSettings,
                                bool exportGeneralSettings,
                                bool exportIsvConfig,
                                bool exportMarketingSettings,
                                bool exportOutlookSynchronizationSettings,
                                bool exportRelationshipRoles)
        {
                                Solutions = solutions;
                                ExportLocation = exportLocation;
                                ExportTypeSetting = exportType;
                                ExportAutoNumberingSettings = exportAutoNumberingSettings;
                                ExportCalendarSettings = exportCalendarSettings;
                                ExportCustomizationSettings = exportCustomizationSettings;
                                ExportEmailTrackingSettings = exportEmailTrackingSettings;
                                ExportGeneralSettings = exportGeneralSettings;
                                ExportIsvConfig = exportIsvConfig;
                                ExportMarketingSettings = exportMarketingSettings;
                                ExportOutlookSynchronizationSettings = exportOutlookSynchronizationSettings;
                                ExportRelationshipRoles = exportRelationshipRoles;
        }
    }
}
